a = int(input("请输入一个数:"))
baiwan = a // 1000000
shiwan = a % 1000000 // 100000
wan = a % 100000 // 10000
print(wan)
qian = a % 10000 // 1000
print(qian)
bai = a % 1000 // 100
print(bai)
shi = a % 100 // 10
print(shi)
ge = a % 10
print(ge)
print(baiwan + shiwan + wan + qian + bai + shi + ge)
